home *** CD-ROM | disk | FTP | other *** search
/ The World's Largest Collection of Windows Software / The World's Largest Collection of Windows Software - Disc 2.iso / textproc / _b5 / u2d / test.unx < prev    next >
Text File  |  1994-04-02  |  6KB  |  147 lines

  1.            U2D : Convert Unix text files to MS-DOS format
  2.            ==============================================
  3.  
  4. Keywords: Windows 3.1 Drag Drop Unix text ASCII MS-DOS convert
  5.  
  6.  
  7. U2D is a Windows 3.1 program which converts Unix text file line
  8. endings to MS-DOS format.  U2D is an example of a Windows "drag-and-drop"
  9. application.  To convert a file, all you have to do is to click on a file
  10. in the Program Manager, drag it to the U2D icon and drop it off.  U2D can
  11. process multiple files at a time.
  12.  
  13.  
  14.                           Do you need U2D?
  15.                           ================
  16.  
  17. Only if you use Unix systems.  I transfer files from a Unix system to
  18. my PC on a regular basis.  The Unix program 'unix2dos' and communication
  19. programs such as Omen Technology's sz program will translate Unix text
  20. line endings to MS-DOS format.  I seldom remember to do this before
  21. transfering text files (most of the files I transfer are binary, and
  22. text files tend to be contained in ZIP files) hence my need for a
  23. conversion utility on the PC side.  I wrote a DOS utility to do the
  24. conversion but I use Windows most of the time thus the need for U2D.
  25.  
  26. Unix text files terminate a line with the newline (0x0A) character.
  27. MS-DOS terminates text lines with a CR-LF pair (0x0D, 0x0A).  U2D
  28. simply finds the newline character and adds a CR character.  What makes
  29. U2D different is its use of Windows drag-and-drop technology.
  30.  
  31.  
  32.                            Installing U2D
  33.                            ==============
  34.  
  35. U2D is distributed as a ZIP file.  Change to, or create, a directory
  36. where you want to store the U2D executable file and this document.
  37. For example, you might do the following:
  38.  
  39.      MD \WINUTIL\U2D
  40.      CD \WINUTIL\U2D
  41.      COPY A:U2D.ZIP
  42.      PKUNZIP U2D
  43.  
  44. This of course assumes that you already have a directory named WINUTIL,
  45. are copying the distribution file from floppy drive A and are using
  46. PKWARE's PKUNZIP to extract the files.
  47.  
  48. In the Program Manager, select the File/Run menu item.  Enter the
  49. directory where the U2D executable resides and click OK.  The U2D icon
  50. will appear at the bottom of your screen.  Unlike most other icons,
  51. double clicking the icon will not open it.  You can only drag and drop
  52. files onto it.  To uninstall U2D, double-click the Windows background
  53. and cancel the program from the Task Manager.
  54.  
  55. You can have U2D run every time you start Windows by editing your
  56. WIN.INI file.  The top section should be [windows].  The third line
  57. should be load=.  Add the path of U2D to look like:
  58.  
  59.      load=c:\winutil\u2d\u2d.exe
  60.  
  61. Now restart Windows.
  62.  
  63.  
  64.                              Using U2D
  65.                              =========
  66.  
  67. U2D converts a file when you select it from the Windows Program Manager,
  68. drag it over the U2D icon and drop it off.  U2D creates a new file with
  69. an extension of ".TXT" in place of the original extension.  For example,
  70. if the file to be converted is named "UNIXDATA.ASC" then a new file will
  71. be created named "UNIXDATA.TXT".  If the output file already exists, it
  72. will be overwritten.  Be careful, you won't be warned if this happens.
  73. I regard this to be a feature rather than a deficiency.
  74.  
  75. U2D will convert multiple files.  You can select multiple files by
  76. using either the CTRL or SHIFT and left mouse button to select multiple
  77. files.  (Consult your Windows documentation on how to do this).
  78.  
  79. By default, U2D creates output files with an extension of ".TXT".  You
  80. can modify the default extension used by making an entry in your WIN.INI
  81. file.  The procedure is described in a later section.
  82.  
  83. The U2D icon tries to stay on top of overlapping windows.  This makes it
  84. more useful when used in conjunction with the File Manager.  I find it
  85. easier to maximize the File Manager and then drag-and-drop without having
  86. File Manager cover the U2D icon. 
  87.  
  88.  
  89.                           Default Extension
  90.                           =================
  91.  
  92. U2D writes its output to a file with the same filename as the input
  93. but with an extension of ".TXT".  You can change this behavior by
  94. making the following addition to your WIN.INI file.  At the bottom of
  95. the file add a new section as follows:
  96.  
  97. [U2D]
  98. Extension=.DOS
  99.  
  100. The two lines above will change the default output file to be written
  101. with an extension of ".DOS".  Don't forget the period before the three
  102. character extension.  You must exit and restart Windows for the change 
  103. to take effect.
  104.  
  105.  
  106.                               Copyright
  107.                               =========
  108.  
  109. U2D is "freeware."  That means that I retain the copyright to the program
  110. but that the program is freely distributable (this is different from
  111. "public domain.").  You may use the program for private and commercial
  112. purposes without any reimbursment to me.  The two restrictions that I
  113. impose are:
  114.  
  115.      1) the U2D program and it's documentation be distributed together,
  116.      2) no fee may be charged for the program except for a reasonable
  117.          distribution fee.
  118.  
  119.  
  120.                               Disclaimer
  121.                               ==========
  122.  
  123. As of this writing there are no known problems.  This represents my
  124. second Windows program and my first attempt at using drag-and-drop
  125. techniques.  If you use this program you do so at your own risk.  If
  126. this is not acceptable, then don't use the program.
  127.  
  128.  
  129.                            Technical Details
  130.                            =================
  131.  
  132. U2D is written in C++ and compiled with the Borland C++ 3.1 compiler.
  133. OWL isn't used.  The API routine DragQueryFile and the window style
  134. WS_EX_ACCEPTFILES are the keys to making the drag-and-drop feature
  135. work.
  136.  
  137.  
  138.                                Support
  139.                                =======
  140.  
  141. You were expecting support for a free program?  I do, however, welcome
  142. your comments and suggestions.
  143.  
  144. Stan Wong
  145. s.wong@ieee.org
  146. 4/2/94
  147.